]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
boxpointer: Defer re-allocation after a flip
authorJasper St. Pierre <jstpierre@mecheye.net>
Fri, 21 Dec 2012 14:20:04 +0000 (09:20 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 21 Dec 2012 17:24:48 +0000 (12:24 -0500)
As we may be flipping the box pointer in response to re-allocation,
like the addition of a new actor to the boxpointer, we can't queue
a re-layout while in a re-layout, so defer.

https://bugzilla.gnome.org/show_bug.cgi?id=690608

js/ui/boxpointer.js

index 8973404b4a9f40c47301545885e3870cd28126a3..9fa800cdbda00eb1b625ed50ae1819bd9f26867f 100644 (file)
@@ -582,7 +582,10 @@ const BoxPointer = new Lang.Class({
         if (this._arrowSide != arrowSide) {
             this._arrowSide = arrowSide;
             this._reposition();
-            this._container.queue_relayout();
+            Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
+                this._container.queue_relayout();
+                return false;
+            }));
         }
     },